package com.linjacy.httpproject.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.apache.ibatis.type.JdbcType;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("user")
@ToString
//@HeadRowHeight(20)
//@ColumnWidth(20)
public class User implements Serializable {

    @TableId
    @ExcelProperty({"用户信息","用户id"})
    private String userId;

    @ExcelProperty({"用户信息","用户名称"})
    private String userName;

    @ExcelProperty({"用户信息","用户密码"})
    private String password;

    @ExcelProperty({"分组", "分组"})
    private String userGroup;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty({"创建时间", "创建时间"})
    private Date createTime;

    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty({"修改时间", "修改时间"})
    private Date updateTime;
}
